package lambda;


import javax.swing.*;
import java.awt.event.ActionListener;

public class LambdaTest4 {
    public static void main(String[] args) {
    }

    public static void countDown(int start, int delay) {
        ActionListener listener = event -> {
            // start--; // Error: Variable used in lambda expression should be final or effectively final
            System.out.println(start);
        };
        new Timer(delay, listener).start();
    }
}
